package com.ksl.kinglockguard.data;

import java.io.File;

import android.os.Environment;

import com.lsk.open.core.BaseConstants;

public class Constants {
	public static final String FOLDER_ROOT = Environment.getExternalStorageDirectory().getAbsolutePath()+"/kslock/";
	public static final String PAY_PATH = Environment.getExternalStorageDirectory().getAbsolutePath()+"/Android/data/com.kingslock/";
	public static final String FOLDER_ICONS = FOLDER_ROOT + "icon/";//用于存放下载的桌面的图片
	public static final String FOLDER_PICTURE = FOLDER_ROOT + "deskpicture/";//用于存放下载的桌面的图片
	public static final String FOLDER_DESKICON = FOLDER_ROOT + "deskicon/";//用于存放桌面的资讯小图片
	public static final String FOLDER_BANNERPIC = FOLDER_ROOT + "bannerpicture/";//用于存放焦点图
	public static final String FOLDER_H5PIC = FOLDER_ROOT + "h5pic/";//用于h5游戏的的图片
	public static final String FOLDER_PUSHPIC = FOLDER_ROOT + "pushpic/";//用于飘窗的图片
	public static final String FOLDER_SHORTCUT = FOLDER_ROOT + "shortcut/";//用于桌面快捷方式的图片
	public static final String FOLDER_PROTOCEL = FOLDER_ROOT + "protocol/";
	public static final String FOLDER_USERICONS = FOLDER_ROOT + "usericon/";
	public static final String FOLDER_UPDATE=  FOLDER_ROOT+"update/";
	public static final String FOLDER_DOWNLOAD=  FOLDER_ROOT+"download/";//下载的apk存放目录
	public static final String FOLDER_ERROR=  FOLDER_ROOT+"error/";//错误日志目录
	public static final String FOLDER_WEBVIEWCACHE=  FOLDER_ROOT+"webcache/";
	public static final String FOLDER_PLUGINS =  FOLDER_ROOT + "plugins";
	public static final String PATH_PAY_FILE = FOLDER_ROOT + "numbers.txt";
	public static final String APK_TYPE="update.apk";
	public static final String TF_TYPE="tf.dat";
	public static final String PRIVATE_UPDATE= Environment.getExternalStorageDirectory().getAbsolutePath()+"/.kslock/";
	public static final String UUID_FILE = Environment.getExternalStorageDirectory().getAbsolutePath()+"/Android/data/"+ ".uuid";
	
	public final static String FSKEY_NEWlISTS = "fslist_001";// 表示首页文件列表
	public final static String BANNER_LIST = "bannerlist_001";// 表示焦点图广告列表
	public final static String H5_LIST = "h5list_001";// 表示H5游戏列表
	public final static String PUSH_NEWS = "push_001";// 表示H5游戏列表
	public final static String SERIALIZABLE_SAVE_DIR=FOLDER_ROOT+"/seria";
	public final static String PAY_FILE_NAME="payfile_001";
	
	public final static String SERIALIZABLE_MAIN_PAGE=FOLDER_ROOT+"/seria/"+FSKEY_NEWlISTS;
	public final static String SERIALIZABLE_PUSH_CACHE=FOLDER_ROOT+"/seria/"+PUSH_NEWS;
	
	public static final int GET_RECOMMEND_AD = 0;
	public static final int GET_LOCKSCREEN_AD = 1;
	public static final int GET_LOCKSCREEN_IMAGE = 2;
	
	public static final String GAME_CENTER_SID = "sid";
	public static final String GAME_CENTER_FORM = "from";
	public static final String GAME_CENTER_DETAIL_AUTO_DOWNLOAD = "auto_download";
	public static final String GAMEC_ENTER_SUB_TITLE = "title";
	public static final String GAME_CENTER_SUB_DESC = "desc";
	public static final String GAME_CENTER_SUB_DATE = "date";
	public static final String GAME_CENTER_SUB_EXTRA_ID = "extra_id";
	
	public final static int ARTICLE_CAT_NEWS = 1;
	public final static int ARTICLE_CAT_AD = 2;
	public final static int ARTICLE_CAT_GAME = 3;
	
	public static final String FROM = "from";
	
	public final static int COLUMN_COUNT = 2; // 显示列数
	
	public final static int PICTURE_COUNT_PER_LOAD = 20; // 每次加载30张图片
	
	public final static int PICTURE_TOTAL_COUNT = 10000;   //允许加载的最多图片数
	
	public final static int HANDLER_WHAT = 1;
	
	public final static int MESSAGE_DELAY = 200;
	
	/***进入DetailPageActivity时，是从何处进入的***/
	public static final String FROM_HOME_LIST = "main";
	public static final String FROM_SCREEN = "screen";
	public static final String FROM_FOCUS = "focus";
	public static final String FROM_H5_PAGE = "h5page";
	public final static String FROM_SHORT_CUT = "shortcut";
	
	public final static String SHANG_HAI = "上海";
	
	/***下载图片的类型***/
	public static final int LOCK_ITEM_PICTURE = 0;
	public static final int LOCK_SCREEN_PICTURE = 1; 
	public static final int LOCK_BANNER_PICTURE = 2;
	public static final int LOCK_DESK_ICON = 3;
	public static final int LOCK_BLUR_PICTURE = 4;
	public static final int LOCK_H5_PICTURE = 5;
	public static final int LOCK_PUSH_PICTURE = 6;
	public static final int LOCK_SHORT_CUT = 7;
	
	//用来表示是否是嵌入到大厅中的，如果为true会隐藏掉详情界面的上一篇，下一篇两个按钮
	public static final boolean IS_GAMECENTER = false;
	
	public static void initFiles(){
		
		File root = new File(FOLDER_ROOT);
		if(!root.exists()){
			root.mkdirs();
		}
		File icon = new File(FOLDER_ICONS);
		if(!icon.exists()){
			icon.mkdirs();
		}
		File bannerPicture = new File(FOLDER_BANNERPIC);
		if(!bannerPicture.exists()){
			bannerPicture.mkdirs();
		}
		File picture = new File(FOLDER_PICTURE);
		if(!picture.exists()){
			picture.mkdirs();
		}
		File h5Picture = new File(FOLDER_H5PIC);
		if(!h5Picture.exists()){
			h5Picture.mkdirs();
		}
		
		File error = new File(FOLDER_ERROR);
		if(!error.exists()){
			error.mkdirs();
		}
		
		File deskIcon = new File(FOLDER_DESKICON);
		if(!deskIcon.exists()){
			deskIcon.mkdirs();
		}
		
		File update = new  File(FOLDER_UPDATE);
		if(!update.exists()){
			update.mkdirs();
		}
		
		File download = new  File(FOLDER_DOWNLOAD);
		if(!download.exists()){
			download.mkdirs();
		}
				
		File webviewcache = new  File(FOLDER_WEBVIEWCACHE);
		if(!webviewcache.exists()){
			webviewcache.mkdirs();
		}
		
		File shortcut = new  File(FOLDER_SHORTCUT);
		if(!shortcut.exists()){
			shortcut.mkdirs();
		}
		
		File plugins = new  File(FOLDER_PLUGINS);
		if(!plugins.exists()){
            plugins.mkdirs();
		}
	}
	
}
